home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / tcp / AmiTCP_bin_22.lha / AmiTCP-2.2 / doc / netutil.doc < prev    next >
Text File  |  1993-11-19  |  29KB  |  659 lines

  1. TABLE OF CONTENTS
  2.  
  3. netutil.doc/arp
  4. netutil.doc/ifconfig
  5. netutil.doc/inetd
  6. netutil.doc/letnet
  7. netutil.doc/offline
  8. netutil.doc/online
  9. netutil.doc/ping
  10. netutil.doc/route
  11. netutil.doc/arp                                               netutil.doc/arp
  12.  
  13.   NAME
  14.        Arp - address resolution display and control
  15.  
  16.   SYNOPSIS
  17.        arp hostname
  18.        arp -a [netname | hostname]
  19.        arp -d hostname
  20.        arp -s hostname address [temp] [pub] 
  21.        arp -f filename
  22.  
  23.   DESCRIPTION
  24.        Arp displays and modifies the Internet to hardware address
  25.        translation tables used by the Address Resolution Protocol. The
  26.        hardware address is a hexadecimal string with each octet separated
  27.        by a colon, for instance 0:12:ff:a. The length of the address must
  28.        be correct for the specified interface.
  29.  
  30.   OPTIONS
  31.         none If no options are specified (first form above), arp displays
  32.              the current ARP entry for hostname.  The hostname must either
  33.              appear in the hostname database (SEE hosts), or be a DARPA
  34.              Internet address expressed in Internet standard "dot
  35.              notation". Hostname can also be resolved by nameserver.
  36.  
  37.        -a    Display all current ARP entries by reading the address mapping
  38.              table of the specified (sub)network. `Hostname' is used to as
  39.              default network specifier.
  40.  
  41.        -d    If an ARP entry exists for the host called hostname, delete
  42.              it. [This requires super-user privileges.]
  43.  
  44.        -s    Create an ARP entry for the host called hostname with the
  45.              hardware station address address. The hardware station address
  46.              is given as hexadecimal bytes separated by colons. If an ARP
  47.              entry already exists for hostname, the existing entry is
  48.              updated with the new information. The entry is permanent
  49.              unless the word temp is given in the command. If the word pub
  50.              is specified, the entry is published, which means that this
  51.              system will act as an ARP server responding to requests for
  52.              hostname even though the host address is not its own.
  53.  
  54.        -f    Read file filename and set multiple entries in the ARP tables.
  55.              Entries in the file should be of the form:
  56.  
  57.                   hostname address [temp] [pub]
  58.  
  59.              Argument meanings are the same as for the -s option.
  60.  
  61.   AUTHOR
  62.        Arp was developed by the University of California, Berkeley, for the
  63.        BSD Unix system.
  64.  
  65.   SEE ALSO
  66.        ifconfig, netif.protocols/arp, "net/if_arp.h"
  67.  
  68. netutil.doc/ifconfig                                     netutil.doc/ifconfig
  69.  
  70.   NAME
  71.        ifconfig - configure network interface parameters
  72.  
  73.   SYNOPSIS
  74.        ifconfig interface address_family [address [dest_address]] [params]
  75.        ifconfig interface [address_family]
  76.  
  77.   DESCRIPTION
  78.        ifconfig is used to assign an address to a network interface and/or
  79.        configure network interface parameters.  ifconfig must be used at
  80.        boot time to define the network address of each interface present on
  81.        a machine.  It can also be used at other times to redefine an
  82.        interface's address or other operating parameters.
  83.  
  84.   PARAMETERS
  85.        interface    A string of the unit name. The device name (e.g.
  86.                      'a2065.device') concatenated with a slash ('/') and the
  87.                      unit number ('11'), for example 'a2065.device/11' is a
  88.                      legal unit name.
  89.  
  90.        address_family 
  91.                     Name of protocol on which naming scheme is based.  An
  92.                      interface can receive transmissions in differing
  93.                      protocols, each of which may require separate naming
  94.                      schemes.  Therefore, it is necessary to specify the
  95.                      address_family, which may affect interpretation of the
  96.                      remaining parameters on the command line.  The only
  97.                      address family currently supported is inet (DARPA-
  98.                      Internet family).
  99.  
  100.        address      Either a host name present in the host name database,
  101.                      (SEE hosts), or a DARPA Internet address
  102.                      expressed in Internet standard "dot notation".  The
  103.                      host number can be omitted on 10-Mbyte/second Ethernet
  104.                      interfaces (which use the hardware physical address),
  105.                      and on interfaces other than the first.
  106.  
  107.        dest_address Address of destination system.  Consists of either a
  108.                      host name present in the host name database, hosts(4),
  109.                      or a DARPA Internet address expressed in Internet
  110.                      standard "dot notation".
  111.  
  112.   SWITCHES  
  113.        The following operating parameters can be specified:
  114.  
  115.         up           Mark an interface "up". Enables interface after an
  116.                      "ifconfig down."  Occurs automatically when setting the
  117.                      address on an interface.  Setting this flag has no
  118.                      effect if the hardware is "down".
  119.  
  120.         down         Mark an interface "down".  When an interface is
  121.                      marked "down", the system will not attempt to
  122.                      transmit messages through that interface. If
  123.                      possible, the interface will be reset to disable
  124.                      reception as well.  This action does not
  125.                      automatically disable routes using the interface.
  126.  
  127.        arp           Enable the use of Address Resolution Protocol in
  128.                      mapping between network level addresses and link-level
  129.                      addresses (default).  
  130.  
  131.        -arp          Disable the use of Address Resolution Protocol.
  132.  
  133.         metric n     Set the routing metric of the interface to n,
  134.                      default 0.  The routing metric is used by the routing
  135.                      protocol (see gated(1m)).  Higher metrics have the
  136.                      effect of making a route less favorable; metrics are
  137.                      counted as additional hops to the destination network
  138.                      or host.
  139.  
  140.         debug        Enable driver-dependent debugging code. This usually
  141.                      turns on extra console error logging.
  142.  
  143.        -debug        Disable driver-dependent debugging code.
  144.  
  145.         netmask mask (Inet only) Specify how much of the address to reserve
  146.                      for subdividing networks into sub-networks.  mask
  147.                      includes the network part of the local address, and the
  148.                      subnet part which is taken from the host field of the
  149.                      address.  mask can be specified as a single hexadecimal
  150.                      number with a leading 0x, with a dot-notation Internet
  151.                      address, or with a pseudo- network name listed in the
  152.                      network table networks(4).  mask contains 1's for each
  153.                      bit position in the 32-bit address that are to be used
  154.                      for the network and subnet parts, and 0's for the host
  155.                      part.  mask should contain at least the standard
  156.                      network portion, and the subnet field should be
  157.                      contiguous with the network portion.
  158.  
  159.        broadcast    (Inet only) Specify the address that represents
  160.                      broadcasts to the network.  The default broadcast
  161.                      address is the address with a host part of all 1's.
  162.  
  163.        The command:
  164.  
  165.             ifconfig interface/unit
  166.  
  167.        with no optional command arguments supplied displays the current
  168.        configuration for interface.  If address_family is specified,
  169.        ifconfig reports only the details specific to that address family.
  170.  
  171.   DIAGNOSTICS
  172.  
  173.        Messages indicating that the specified interface does not exist, the
  174.        requested address is unknown, or the user is not privileged and
  175.        tried to alter an interface's configuration.
  176.  
  177.   EXAMPLES
  178.  
  179.        ifconfig lo/0 127.0.0.1 
  180.  
  181.                This command marks internal loopback device "UP", and
  182.                attach an inet address 127.0.0.1 to it.
  183.  
  184.        ifconfig cslip.device/0 inet 193.102.4.144 193.102.4.129
  185.  
  186.                This command starts the CSLIP driver, attach an
  187.                address 193.102.4.144 (our internet address) and a
  188.                destination address 193.102.4.129 (the internet
  189.                address of the host you are connecting) to it.
  190.  
  191.        ifconfig devs:network/a2065.device/0 inet 193.124.100.64 +
  192.        netmask 255.255.255.192 -arp
  193.        
  194.                This command loads an ethernet driver for the
  195.                Commodore A2065 Ethernet adapter unit 0, marks it
  196.                "up", disables ARP protocol for it, attaches an inet
  197.                address 193.124.100.65 to it and sets its netmask to
  198.                255.255.255.192.  A bitwise logical and of netmask and
  199.                address for the interface forms a subnet address, in
  200.                this case 193.124.100.64.  All packets aimed to hosts
  201.                with same subnet address (that is hosts 193.124.100.64
  202.                - 193.124.100.127) are routed to this interface.
  203.  
  204.   SEE ALSO
  205.        netstat, hosts, arp, "net/if.h", "net/sana2tags.h"
  206.  
  207. netutil.doc/inetd                                           netutil.doc/inetd
  208.  
  209.   NAME
  210.         inetd - internet ``super-server''
  211.  
  212.   TEMPLATE
  213.        inetd DEBUG/S CONFIGFILE
  214.  
  215.   DESCRIPTION
  216.  
  217.        Inetd should be run when the AmiTCP/IP protocol stack is started.
  218.        Inetd listens for connections on certain internet sockets.  When a
  219.        connection is found on one of its sockets, it decides what service the
  220.        socket corresponds to, and invokes a program to service the request.
  221.        After the program is finished, it continues to listen on the socket
  222.        (except in some cases which will be described below).  Essentially,
  223.        inetd allows running one daemon to invoke several others, reducing
  224.        load on the system.
  225.  
  226.   PARAMETERS
  227.        DEBUG      Turns on debugging.
  228.  
  229.        CONFIGFILE Specifies the configuration file name.
  230.  
  231.   CONFIGURATION
  232.  
  233.        Upon execution, inetd reads its configuration information from a
  234.        configuration file which, by default, is AmiTCP:db/inetd.conf. There
  235.        must be an entry for each field of the configuration file, with
  236.        entries for each field separated by a tab or a space.  Comments are
  237.        denoted by a ``#'' at the beginning of a line or ``;'' anywhere in the
  238.        line. There must be an entry for each field. The fields of the
  239.        configuration file are as follows:
  240.  
  241.              service name
  242.              socket type
  243.              protocol
  244.              wait/nowait
  245.              user
  246.              server program
  247.              server program name
  248.              server program arguments
  249.  
  250.        The service-name entry is the name of a valid service in the
  251.        netdatabase.  For ``internal'' services (discussed below), the service
  252.        name must be the official name of the service.
  253.  
  254.        The socket-type should be one of ``stream'', ``dgram'', ``raw'',
  255.        ``rdm'', or ``seqpacket'', depending on whether the socket is a
  256.        stream, datagram, raw, reliably delivered message, or sequenced packet
  257.        socket. Current system supports only stream, datagram and raw
  258.        protocols.
  259.  
  260.        The protocol must be a valid protocol as given in netdatabase.
  261.        Examples might be ``tcp'' or ``udp''.
  262.  
  263.        The wait/nowait entry is useful for datagram sockets only (other
  264.        sockets should have a ``nowait'' entry in this space).  If a datagram
  265.        server connects to its peer, freeing the socket so inetd can received
  266.        further messages on the socket, it is said to be a ``multi-threaded''
  267.        server, and should use the ``nowait'' entry.  For datagram servers
  268.        which process all incoming datagrams on a socket and eventually time
  269.        out, the server is said to be ``single-threaded'' and should use a
  270.        ``wait'' entry.  Comsat and talkd are both examples of the latter type
  271.        of datagram server.
  272.  
  273.        The user entry should contain the user name of the user as whom the
  274.        server should run. This field is for Unix and future compability
  275.        only.
  276.  
  277.        The server-program entry should contain the pathname of the program
  278.        which is to be executed by inetd when a request is found on its
  279.        socket.  If the server program is resident, the path name should be
  280.        suppressed. If inetd provides this service internally, this entry
  281.        should be ``internal''.
  282.  
  283.        The server-program-name is CLI command name for the server process. It
  284.        is shown in the printout of ``status'' command. (Task name of the
  285.        server process is the service and the peer address, e.g. ``echo
  286.        [192.233.15.19]''.) This and argument entry are optional.
  287.  
  288.        The server program arguments should be just as arguments normally are.
  289.  
  290.        Inetd provides several ``trivial'' services internally by use of
  291.        routines within itself.  These services are ``echo'', ``discard'',
  292.        ``chargen'' (character generator), ``daytime'' (human readable time),
  293.        and ``time'' (machine readable time, in the form of the number of
  294.        seconds since mid­ night, January 1, 1900).  All of these services are
  295.        TCP and UDP based.  For details of these services, consult the
  296.        appropriate RFC from the Network Information Center.
  297.  
  298.        Inetd rereads its configuration file when it receives the CTRL-F
  299.        signal.  Services may be added, deleted or modified when the
  300.        configuration file is reread.
  301.  
  302.   HISTORY
  303.        The inetd command appeared in 4.3BSD system.
  304.  
  305.   SEE ALSO
  306.  
  307. netutil.doc/letnet                                         netutil.doc/letnet
  308.  
  309.   NAME
  310.        Letnet - a simple TCP connection tool
  311.  
  312.   SYNOPSIS
  313.        letnet HOSTNAME/A,PORT/A
  314.  
  315.   DESCRIPTION
  316.        Letnet connects to the specified TCP port at the specified host. The
  317.        data read from standard input is sent to the host and data received
  318.        from the connection is written to the standard output. Letnet
  319.        terminates upon shutdown of the socket or receiving SIGBREAKF_CTRL_C
  320.        signal.
  321.  
  322.   ARGUMENTS
  323.         HOSTNAME/A
  324.                If there is no name service available, hostname may be given
  325.                in the Internet dot notation.
  326.  
  327.         PORT/A
  328.                The port identifier is searched from the standard services
  329.                (SEE ALSO netdb/services) database. A nonstandard
  330.                service port may be specified in the numeric form, numbers
  331.                between 1---65535 are acceptable. 
  332.  
  333.   AUTHOR
  334.        Pekka Pessi, the AmiTCP/IP Group, Helsinki University of Technology
  335.  
  336.   SEE ALSO
  337.        netdb/services, netdb/hosts       
  338.  
  339. netutil.doc/offline                                       netutil.doc/offline
  340.  
  341.   NAME
  342.        Offline - put a SANA-II device offline 
  343.  
  344.   TEMPLATE
  345.        Offline DEV=DEVICE devicename[/unit] [UNIT unit]
  346.  
  347.   DESCRIPTION 
  348.        Offline sends the S2_OFFLINE command to the given SANA-II device
  349.        driver and unit. This command is normally used to disconnect SANA-II
  350.        device driver from the network adapter hardware. Device driver does
  351.        not accept any more read or write requests.
  352.  
  353.   EXAMPLES 
  354.        This command puts the SLIP offline, which frees then the serial port
  355.        to your use.
  356.  
  357.        OFFLINE slip.device/1
  358.  
  359.   SEE ALSO
  360.        Online, sana2.device/S2_OFFLINE
  361.  
  362. netutil.doc/online                                         netutil.doc/online
  363.  
  364.   NAME
  365.        Online - put a SANA-II device online 
  366.  
  367.   TEMPLATE
  368.        Online DEV=DEVICE devicename[/unit] [UNIT unit]
  369.  
  370.   DESCRIPTION 
  371.        Online sends the S2_ONLINE command to the given SANA-II device driver
  372.        and unit. The device driver restarts the network adapter hardware and
  373.        accepts read and write request again.
  374.  
  375.   EXAMPLES 
  376.  
  377.        This command puts the Commodore Ethernet driver online.
  378.  
  379.        Online a2065.device/0
  380.  
  381.   SEE ALSO
  382.        Offline, sana2.device/S2_ONLINE
  383.  
  384. netutil.doc/ping                                             netutil.doc/ping
  385.  
  386.    NAME
  387.        ping - send ICMP ECHO_REQUEST packets to network hosts
  388.    
  389.    SYNOPSIS
  390.        ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern] 
  391.             [-s packetsize]
  392.    
  393.    DESCRIPTION
  394.        Ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
  395.        elicit an ICMP ECHO_RESPONSE from a host or gateway.  ECHO_REQUEST
  396.        datagrams (``pings'') have an IP and ICMP header, followed by a
  397.        ``struct timeval'' and then an arbitrary number of ``pad'' bytes
  398.        used to fill out the packet.  The options are as follows: Other
  399.        options are:
  400.    
  401.        -c count
  402.                Stop after sending (and receiving) count ECHO_RESPONSE
  403.                packets.
  404.    
  405.        -d      Set the SO_DEBUG option on the socket being used.
  406.    
  407.        -f      Flood ping.  Outputs packets as fast as they come back or
  408.                one hundred times per second, whichever is more.  For every
  409.                ECHO_REQUEST sent a period ``.'' is printed, while for ever
  410.                ECHO_REPLY received a backspace is printed.  This provides a
  411.                rapid display of how many packets are being dropped.  Only
  412.                the super-user may use this option.  This can be very hard
  413.                on a network and should be used with caution.
  414.    
  415.        -i wait
  416.                Wait wait seconds between sending each packet. The default
  417.                is to wait for one second between each packet.  This option
  418.                is incompatible with the -f option.
  419.    
  420.        -l preload
  421.                If preload is specified, ping sends that many packets as
  422.                fast as possible before falling into its normal mode of
  423.                behavior.
  424.    
  425.        -n      Numeric output only.  No attempt will be made to lookup
  426.                symbolic names for host addresses.
  427.    
  428.        -p pattern
  429.                You may specify up to 16 ``pad'' bytes to fill out the
  430.                packet you send.  This is useful for diagnosing
  431.                data-dependent problems in a network.  For example, ``-p
  432.                ff'' will cause the sent packet to be filled with all ones.
  433.    
  434.        -q      Quiet output.  Nothing is displayed except the summary lines
  435.                at startup time and when finished.
  436.    
  437.        -R      Record route.  Includes the RECORD_ROUTE option in the
  438.                ECHO_REQUEST packet and displays the route buffer on
  439.                returned packets.  Note that the IP header is only large
  440.                enough for nine such routes.  Many hosts ignore or discard
  441.                this option.
  442.    
  443.        -r      Bypass the normal routing tables and send directly to a host
  444.                on an attached network.  If the host is not on a
  445.                directly-attached network, an error is returned.  This
  446.                option can be used to ping a local host through an interface
  447.                that has no route through it.
  448.    
  449.        -s packetsize
  450.                Specifies the number of data bytes to be sent.  The default
  451.                is 56, which translates into 64 ICMP data bytes when
  452.                combined with the 8 bytes of ICMP header data.
  453.    
  454.        -v      Verbose output.  ICMP packets other than ECHO_RESPONSE that
  455.                are received are listed.
  456.    
  457.        When using ping for fault isolation, it should first be run on the
  458.        local host, to verify that the local network interface is up and
  459.        running.  Then, hosts and gateways further and further away should
  460.        be ``pinged''.  Round-trip times and packet loss statistics are
  461.        computed.  If duplicate packets are received, they are not included
  462.        in the packet loss calculation, although the round trip time of
  463.        these packets is used in calculating the minimum/average/maximum
  464.        round-trip time numbers.  When the specified number of packets have
  465.        been sent (and received) or if the program is terminated with a
  466.        SIGINT, a brief summary is displayed.
  467.    
  468.        This program is intended for use in network testing, measurement and
  469.        management.  Because of the load it can impose on the network, it is
  470.        unwise to use ping during normal operations or from automated
  471.        scripts.
  472.    
  473.    ICMP PACKET DETAILS 
  474.        An IP header without options is 20 bytes.  An ICMP ECHO_REQUEST
  475.        packet contains an additional 8 bytes worth of ICMP header followed
  476.        by an arbitrary amount of data.  When a packetsize is given, this
  477.        indicated the size of this extra piece of data (the default is 56).
  478.        Thus the amount of data received inside of an IP packet of type ICMP
  479.        ECHO_REPLY will always be 8 bytes more than the requested data space
  480.        (the ICMP header).
  481.    
  482.        If the data space is at least eight bytes large, ping uses the first
  483.        eight bytes of this space to include a timestamp which it uses in
  484.        the computation of round trip times.  If less than eight bytes of
  485.        pad are specified, no round trip times are given.
  486.    
  487.    DUPLICATE AND DAMAGED PACKETS
  488.        Ping will report duplicate and damaged packets.  Duplicate packets
  489.        should never occur, and seem to be caused by inappropriate
  490.        link-level retransmissions.  Duplicates may occur in many situations
  491.        and are rarely (if ever) a good sign, although the presence of low
  492.        levels of duplicates may not always be cause for alarm.
  493.    
  494.        Damaged packets are obviously serious cause for alarm and often
  495.        indicate broken hardware somewhere in the ping packet's path (in the
  496.        network or in the hosts).
  497.    
  498.    TRYING DIFFERENT DATA PATTERNS
  499.        The (inter)network layer should never treat packets differently
  500.        depending on the data contained in the data portion.  Unfortunately,
  501.        data-dependent problems have been known to sneak into networks and
  502.        remain undetected for long periods of time.  In many cases the
  503.        particular pattern that will have problems is something that doesn't
  504.        have sufficient ``transitions'', such as all ones or all zeros, or a
  505.        pattern right at the edge, such as almost all zeros.  It isn't
  506.        necessarily enough to specify a data pattern of all zeros (for
  507.        example) on the command line because the pattern that is of interest
  508.        is at the data link level, and the relationship between what you
  509.        type and what the controllers transmit can be complicated.
  510.    
  511.        This means that if you have a data-dependent problem you will
  512.        probably have to do a lot of testing to find it.  If you are lucky,
  513.        you may manage to find a file that either can't be sent across your
  514.        network or that takes much longer to transfer than other similar
  515.        length files.  You can then examine this file for repeated patterns
  516.        that you can test using the -p option of ping.
  517.    
  518.    TTL DETAILS
  519.        The TTL value of an IP packet represents the maximum number of IP
  520.        routers that the packet can go through before being thrown away.  In
  521.        current practice you can expect each router in the Internet to
  522.        decrement the TTL field by exactly one.
  523.    
  524.        The TCP/IP specification states that the TTL field for TCP packets
  525.        should be set to 60, but many systems use smaller values (4.3 BSD
  526.        uses 30, 4.2 used 15). The AmiTCP/IP uses normally TTL value 30.
  527.    
  528.        The maximum possible value of this field is 255, and most systems
  529.        set the TTL field of ICMP ECHO_REQUEST packets to 255.  This is why
  530.        you will find you can ``ping'' some hosts, but not reach them with
  531.        telnet or ftp.
  532.    
  533.        In normal operation ping prints the ttl value from the packet it re-
  534.        ceives.  When a remote system receives a ping packet, it can do one
  535.        of three things with the TTL field in its response:
  536.    
  537.        ·   Not change it; this is what Berkeley Unix systems did before the
  538.            4.3BSD-Tahoe release.  In this case the TTL value in the
  539.            received packet will be 255 minus the number of routers in the
  540.            round-trip path.
  541.    
  542.        ·   Set it to 255; this is what AmiTCP/IP and current Berkeley Unix
  543.            systems do.  In this case the TTL value in the received packet
  544.            will be 255 minus the number of routers in the path from the
  545.            remote system to the pinging host.
  546.    
  547.        ·   Set it to some other value.  Some machines use the same value
  548.            for ICMP packets that they use for TCP packets, for example
  549.            either 30 or 60.  Others may use completely wild values.
  550.    
  551.    BUGS
  552.        Many Hosts and Gateways ignore the RECORD_ROUTE option.
  553.    
  554.        The maximum IP header length is too small for options like
  555.        RECORD_ROUTE to be completely useful.  There's not much that that
  556.        can be done about this, however.
  557.    
  558.        Flood pinging is not recommended in general, and flood pinging the
  559.        broadcast address should only be done under very controlled
  560.        conditions.
  561.    
  562.    SEE ALSO
  563.        netstat,  ifconfig
  564.    
  565.    AUTHOR 
  566.        The ping command originally appeared in 4.3BSD.
  567.  
  568. netutil.doc/route                                           netutil.doc/route
  569.  
  570.    NAME
  571.         route - manually manipulate the routing tables
  572.    
  573.    SYNOPSIS
  574.         route [-n] [-q] [-v] command [modifiers] destination gateway
  575.    
  576.    DESCRIPTION
  577.         Route is a program used to manually manipulate the network routing
  578.         tables. 
  579.    
  580.         Options supported by route:
  581.    
  582.         -n      Prevent attempts to print host and network names
  583.                 symbolically when reporting actions.
  584.    
  585.         -v      (verbose) Print additional details.
  586.    
  587.         -q      Suppress all output.
  588.    
  589.         Commands accepted by route:
  590.    
  591.         add         Add a route.
  592.         delete      Delete a specific route.
  593.    
  594.         The destination is the destination host or network, gateway is the
  595.         next-hop gateway to which packets should be addressed. Routes to a
  596.         particular host are distinguished from those to a network by
  597.         interpreting the Internet address associated with destination. The
  598.         optional modifiers -net and -host force the destination to be
  599.         interpreted as a network or a host, respectively.  Otherwise, if the
  600.         destination has a ``local address part'' of INADDR_ANY, or if the
  601.         destination is the symbolic name of a network, then the route is
  602.         assumed to be to a network; otherwise, it is presumed to be a route
  603.         to a host.
  604.    
  605.         For example, 128.32 is interpreted as -host 128.0.0.32; 128.32.130
  606.         is interpreted as -host 128.32.0.130; -net 128.32 is interpreted as
  607.         128.32.0.0; and -net 128.32.130 is interpreted as 128.32.130.0.
  608.    
  609.         To add a default route, give the destination as 'default'.
  610.     
  611.         If the route is via an interface rather than via a gateway, the
  612.         -interface modifier should be specified; the gateway given is the
  613.         address of this host on the common network, indicating the interface
  614.         to be used for transmission.
  615.    
  616.         The optional -netmask qualifier is used to specify the netmask of
  617.         the interface. One specifies an additional ensuing address parameter
  618.         (to be interpreted as a network mask).  The implicit network mask
  619.         generated can be overridden by making sure this option follows the
  620.         destination parameter.
  621.    
  622.         All symbolic names specified for a destination or gateway are looked
  623.         up first as a host name using gethostbyname(). If this lookup fails,
  624.         getnetbyname() is then used to interpret the name as that of a
  625.         network.
  626.    
  627.    DIAGNOSTICS
  628.         add [host | network ] %s: gateway %s flags %x
  629.                 The specified route is being added to the tables. The values
  630.                 printed are from the routing table entry supplied in the
  631.                 IoctlSocket() call. If the gateway address used was not the
  632.                 primary address of the gateway (the first one returned by
  633.                 gethostbyname()), the gateway address is printed numerically
  634.                 as well as symbolically.
  635.    
  636.         delete [ host | network ] %s: gateway %s flags %x
  637.                 As above, but when deleting an entry.
  638.    
  639.         Network is unreachable
  640.                 An attempt to add a route failed because the gateway listed
  641.                 was not on a directly-connected network.  The next-hop
  642.                 gateway must be given.
  643.    
  644.         not in table
  645.                 A delete operation was attempted for an entry which wasn't
  646.                 present in the tables.
  647.    
  648.         routing table overflow
  649.                 An add operation was attempted, but the system was low on
  650.                 resources and was unable to allocate memory to create the
  651.                 new entry.
  652.    
  653.    SEE ALSO
  654.         ifconfig, protocols/routing
  655.    
  656.    HISTORY
  657.         The route command appeared in 4.2BSD.
  658.    
  659.